<template>
  <div id="latex">{{ latext }}</div>
</template>
<script>
export default {
  name: "home",
  data() {
    return {
      latext: "",
    };
  },
  mounted() {
    setTimeout(() => {
      this.latext = "$ y=Asin(\\omega x+\\varphi) $";
      this.$nextTick(() => {
        const tooltip = document.getElementById("latex");
        window.MathJax.typesetPromise([tooltip]);
      });
    }, 5000);
    //window.MathJax.typesetPromise(); //全局渲染
  },
};
</script>
